<!--{include header.htm}-->

<link href="view/my.css" type="text/css" rel="stylesheet" />

<!--{hook my_avatar_before.htm}-->

<div class="width">

	<!--{include my_nav.inc.htm}-->

	<div class="left border shadow bg2">
		<!--{include my_menu.inc.htm}-->
	</div>
	
	<div class="right">
		
		<!--{include my_profile_nav.inc.htm}-->

		<div class="bg1 border shadow">
			<div style="width: 400px; padding: 8px;">
				<!--{hook my_avatar_start.htm}-->
				<div>
					<span class="avatar_huge border" style="{if $_user[avatar_huge]}background-image: url($_user[avatar_huge]);{/if}" id="avatar_huge"></span>
				</div>
				<div class="submit">
					<input type="button" class="button smallblue" id="avatar_button" value="修改头像" />
					<div class="notice" id="notice" style="display: none;"></div>
				</div>
				<!--{hook my_avatar_end.htm}-->
			</div>
		</div>
	</div>
</div>	

<!--{include footer.htm}-->

<script type="text/javascript" src="view/js/swfupload/swfupload.js"></script>
<script type="text/javascript" src="view/js/clipimg/clipimg.js"></script>
<script type="text/javascript">
$('#avatar_huge').clipimg({
	postparams:null, 
	buttonid: 'avatar_button', 
	uploadurl: '?user-uploadavatar-$conf[cookie_pre]sid-$_sid-$conf[cookie_pre]auth-$_auth-ajax-1.htm',
	clipurl: '?user-clipavatar-ajax-1.htm',
	baseurl: 'view/js/clipimg/',
	success_recall: function(imgurl, pos) {
		imgurl = imgurl.replace(/_huge\.gif/ig, "_big.gif");
		$('#notice').html('头像修改成功！').show().delay(3000).fadeOut('fast');
		$('#avatar_menu').css('background-image', "url("+imgurl+")");
	}
});
</script>

<!--{hook my_avatar_after.htm}-->

</body>
</html>